package client;

import javax.naming.Context;
import javax.naming.InitialContext;

import common.exchange;

public class exchangeclient {
	public static void main(String[] args) throws Exception{
				
		Context ctx=new InitialContext();
		exchange ex=null;
		//trien khai tren may khac
		String url="";
		if(args.length==0){
		url="rmi://localhost:1099/ty";
		System.out.println("chay tren server duoc chi dinh");
		}
		else
			url=args[0];
		ex=(exchange)ctx.lookup(url);
		
		//ex la proxy object den server
		double trungso=ex.usd2vnd(10000);
		System.out.println("ket qua"+trungso);
	}
}//rmi://hao-pc:1099/ty
